﻿using Avalonia.Controls;
using CommunityToolkit.Mvvm.Input;

namespace AvaloniaApplication1.ViewModels;

public partial class MainWindowViewModel(Window window) : ViewModelBase
{
    [RelayCommand]
    private void OnMinimize()
    {
        window.WindowState = WindowState.Minimized;
    }

    [RelayCommand]
    private void OnMaximize()
    {
        window.WindowState ^= WindowState.Maximized;
    }
    
    [RelayCommand]
    private void OnClose()
    {
        window.Close();
    }
}
